@extends('adminDialog')

@section('content')
<form action="{{url('admin/areas/update/'.$model->id)}}" method="POST" class="J_ajaxForm">
    <input type="hidden" name="_token" value="{{ csrf_token() }}">
    <div class="pop_cont pop_table">
        <table width="100%">
            <tbody>
            <tr>
                <th><label for="parent_id">所属上级 <span class="red">*</span></label></th>
                <td>
                    <select name="parent_id" id="parent_id">
                        @foreach($provinces as $pro)
                            <option @if ($pro->id == $model->parent_id) selected="selected" @endif value="{{$pro->id}}">{{$pro->name}}</option>
                        @endforeach
                    </select>
                </td>
            </tr>
            <tr>
                <th><label for="name">城市名称 <span class="red">*</span></label></th>
                <td>
                    <input type="text" name="name" id="name" class="input length_2" value="{{$model->name}}"/>
                </td>
            </tr>
            <tr>
                <th><label for="fletter">首字母 <span class="red">*</span></label></th>
                <td>
                    <input type="text" name="fletter" id="fletter" class="input length_2" value="{{$model->fletter}}"/>
                </td>
            </tr>
            <tr>
                <th><label for="is_host">是否热门城市</label></th>
                <td>
                    <input type="radio" @if($model->is_hot) checked="checked" @endif name="is_hot" value="1" id="is_hot_1"/><label for="is_hot_1">是</label>
                    <input type="radio" @if(!$model->is_hot) checked="checked" @endif name="is_hot" value="0" id="is_hot_2"/><label for="is_hot_2">否</label>
                </td>
            </tr>
            <tr>
                <th><label for="status">状态</label></th>
                <td>
                    <input type="radio" @if($model->status) checked="checked" @endif name="status" value="1" id="status_1"/><label for="status_1">启用</label>
                    <input type="radio" @if(!$model->status) checked="checked" @endif name="status" value="0" id="status_2"/><label for="status_2">禁用</label>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <div class="pop_bottom cc">
        <button type="reset" class="btn fr" id="J_dialog_close">取消</button>
        <button type="submit" class="btn btn_submit J_ajax_submit_btn fr mr10" id="J_dialog_close">提交</button>
    </div>
</form>
@stop

@section('style')
    <style>
        .body_none {width: 300px;}
        .uploadifyQueue {display: none;}
    </style>
@stop